package com.example.bus.spring.listener;

import com.example.bus.entity.UserEntity;
import com.example.bus.spring.bus.DemoBus;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @author guoQ.z
 * @date 2021/3/3
 */
@Component
public class SpringEventListener02 implements ApplicationListener<DemoBus> {
    @Override
    public void onApplicationEvent(DemoBus demoBus) {
        UserEntity userEntity = demoBus.getUserEntity();
        System.out.println("SpringEventListener.onApplicationEvent02 listener：" + userEntity);
    }
}
